package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.NursingProjectDto;
import com.zzyl.dto.NursingProjectPageQueryDto;
import com.zzyl.entity.NursingProject;
import com.zzyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingProjectMapper {

    Page<NursingProjectVo> query(NursingProjectPageQueryDto dto);

    void add(NursingProject nursingProject);

    @Select("select * from nursing_project where id=#{id}")
    NursingProjectVo selectid(Long id);

    void update(NursingProject dto);


    void status(Long id, Integer status);

    @Delete("delete from nursing_project where id=#{id}")
    void deleteid(Long id);

    @Select("select * from nursing_project where status=1 order by update_time desc ")
    List<NursingProject> selectall();

    Page<NursingProjectVo> query2(NursingProjectPageQueryDto dto);

    void add2(NursingProject nursingProject);
}